package com.shopping.model;


/**
 * carts 购物车实体类
 * @author 
 */
public class Carts{
	private int id;     // 购物车ID
    private int userId; // 用户ID
    private int goodId; // 商品ID
    private int amount; // 商品数量      
    private Goods good; // 数据库没有对应的字段,根据goodId在goods表中查询。  
    private int total;  // 商品总价=商品数量*商品价格。
    					// 数据库没有对应的字段，需要计算得出。
	@Override
	public String toString() {
		return "Carts [id=" + id + ", userId=" + userId + ", goodId=" + goodId + ", amount=" + amount + ", good=" + good
				+ ", total=" + total + ", getId()=" + getId() + ", getUserId()=" + getUserId() + ", getGoodId()="
				+ getGoodId() + ", getAmount()=" + getAmount() + ", getGood()=" + getGood() + ", getTotal()="
				+ getTotal() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()="
				+ super.toString() + "]";
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public int getGoodId() {
		return goodId;
	}
	public void setGoodId(int goodId) {
		this.goodId = goodId;
	}
	public int getAmount() {
		return amount;
	}
	public void setAmount(int amount) {
		this.amount = amount;
	}
	public Goods getGood() {
		return good;
	}
	public void setGood(Goods good) {
		this.good = good;
	}
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	
}